using System;

namespace ODX.Core
{
    /// <summary>
    /// All ODX classes throws this exception (or it's subclassed exceptions).
    /// </summary>
    public class OdxException : Exception
    {
        /// <summary>
        /// Creates an ODX exception
        /// </summary>
        /// <param name="message">Message to be passed to the catcher.</param>
        /// <param name="innerException">Inner exception if the ODX exception was created in catch clause.</param>
        public OdxException(string message, Exception innerException)
            : base(message, innerException)
        {
        }

        /// <summary>
        /// Creates an ODX exception
        /// </summary>
        /// <param name="message">Message to be passed to the catcher.</param>
        public OdxException(string message)
            : this(message, null)
        {
        }
    }
}
